import request from '@/config/axios'

export interface rigidtestVO {
  id: string,
  balance: string
}

// 查询统计当日入库数量,出库数量,生产数量,不良品数量
export const getStatistics = () => {
  return request.get({ url: '/project/production-code/statistics' })
}

// 查询实时生产列表
export const getRealtimeProduct = (data: PageParam) => {
  return request.post({ url: '/project/internal-code/listWorkstationDetail', data })
}

export const listCurrentWorkstationDetail = (data: PageParam) => {
  return request.post({ url: '/project/internal-code/listCurrentWorkstationDetail', data })
}

// 查询扫码溯源
export const getCodeRetrospect = (params) => {
  return request.get({ url: '/project/production-code/codeRetrospect', params })
}

export const listCurrentUserWorkstationOrderInfo = (deptId: number, cacheOrderCode: string) => {
  let params = "deptId=" + deptId;
  if(cacheOrderCode == null){
    params += "&cacheOrderCode=";
  }else{
    params += "&cacheOrderCode=" + cacheOrderCode;
  }
  return request.get({ url: '/project/internal-code/listCurrentUserWorkstationOrderInfo?' + params})
}

export const exportWord = (params) => {
  return request.download({ url: '/project/production-code/exportWord', params })
}

export const listCacheOrder = () => {
  return request.get({ url: '/project/internal-code/listCacheOrder' })
}
